<template>
  <el-button v-bind="$attrs" @click.prevent="handleClick">
    <slot />
  </el-button>
</template>

<script>
import { throttle } from '@/utils/index'
export default {
  name: 'ThrottleButton',
  methods: {
    handleClick: throttle(function() {
      this.$emit('click')
    }, 2000)
  }
}
</script>

<style scoped></style>
